home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2009 February
/
PCWFEB09.iso
/
Software
/
Linux
/
Kubuntu 8.10
/
kubuntu-8.10-desktop-i386.iso
/
casper
/
filesystem.squashfs
/
usr
/
lib
/
pm-utils
/
power.d
/
anacron
next >
Wrap
Text File
|
2008-09-02
|
702b
|
22 lines
#!/bin/sh
# This script makes anacron jobs start/stop when a machine gets or
# looses AC power.
# The /etc/init.d/anacron script now normally tries to avoid running
# anacron unless on AC power, so as to avoid running down the battery.
# (Things like the slocate updatedb cause a lot of IO.) Rather than
# trying to second-guess which events reflect having or not having
# power, we just try to run anacron every time and let it abort if
# there's no AC. You'll see a message on the cron syslog facility
# (typically /var/log/cron) if it does run.
case "$1" in
false)
/usr/sbin/invoke-rc.d anacron start >/dev/null
;;
true)
/usr/sbin/invoke-rc.d anacron stop >/dev/null
;;
esac